{% extends 'base.html' %}
{% load staticfiles %}
{% load r_extra %}
{% block navbar %}
    <div class="review-head">
        <div class="review-title">
            <h1 style="text-align:center; color: #35314f">{{ review.title }}</h1>
        </div>
        <br>
        <div class="user-brief">
            <div class="user-review-avatar" style="text-align: center;margin-left: 40px">
                <a href="{% url 'auser:homepage' review.user.id %}">
                    <img src="/media/{{ review.user.avatar }}" alt="##"
                         style="width: 40px;height: 40px;border-radius: 30%">
                </a>
            </div>
            <div class="user-name">
                <a href="{% url 'auser:homepage' review.user.id %}">
                    <h5 style="color: #0e566c;text-align:center;margin-left: 30px">{{ review.user.username }}</h5>
                </a>
            </div>
        </div>
        <br>
        <br>
        <div class="movie-brief" style="text-align:center;margin-left: 30px">
            <div class="movie-title">
                <a href="{% url 'movie:movie_detail' review.movie_id %}">
                    <h3>{{ review.movie.title }}</h3>
                </a>
            </div>
        </div>
    </div>
    <br><br><br>
{% endblock %}
{% block content %}
    <div class="main-bd">
        <div class="content-bd">
            <div class="content-show">
                {% autoescape off %}
                    {#                <article>#}
                    {{ review.body }}
                    {#                </article>#}
                {% endautoescape %}
            </div>
            <br>
            <div class="content-action">
                <a href="javascript:void(0)" class="like" data-status="{{ review | get_r_status:user.id }}"
                   data-like="{{ review|get_r_praise:user.id }}"
                   review-id="{{ review.id }}" style="right: 2px;">
                    <img src="/static/movie/images/like-off.png"/>
                    <span class="user-id" style="display: none;">{{ user.id }}</span>
                    <span class="zan">{{ review.score }}</span>
                </a>
            </div>
        </div>
        <br>
        <div class="comment-bd">
            {% include 'post/_r_comments.html' with comments=comments review=review %}
        </div>
    </div>
{% endblock %}
{% block script %}
    <script src="{% static 'post/js/_review_detail.js' %}"></script>
{% endblock %}